
Partial Class Case_EditFile
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        'Set the session participant for non-single users
        If Not Request("participantid") Is Nothing Then
            Dim participantid As Integer = Convert.ToInt32(Request("participantid"))
            Dim userId As Integer = UserAuthorization.CurrentUser.UserId
            Dim editParticipant As Cdm.DataCore.Entities.Participant = Cdm.DataCore.Entities.Participant.RetrieveForCurrentUser(participantid, userId)

            If editParticipant Is Nothing Then
                'Do nothing - just display message
            Else

                Session("Participant") = editParticipant
                Session("ParticipantId") = editParticipant.Id
                Session("SpendingPlanId") = Nothing

                If Request("ActiveTab") IsNot Nothing Then
                    'Response.Redirect("casepersonal.aspx?ActiveTab=" & Request("ActiveTab"))
                    Response.Redirect("casepersonal.aspx?" & Request.QueryString.ToString())
                Else
                    Response.Redirect("casepersonal.aspx")
                End If

            End If
        End If

        
    End Sub
End Class
